Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@octokit/plugin-paginate-rest

Package Overview
Dependencies
Maintainers
3
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@octokit/plugin-paginate-rest

Octokit plugin to paginate REST API endpoint responses

  • 2.21.3
  • release-2.x
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.8M
decreased by-40.8%
Maintainers
3
Weekly downloads
 
Created

What is @octokit/plugin-paginate-rest?

The @octokit/plugin-paginate-rest npm package is a plugin for Octokit, which is a GitHub API client. It simplifies the process of paginating through REST API responses, allowing users to easily retrieve all items from a list endpoint that supports pagination. This is particularly useful when dealing with GitHub's REST API, which often limits the number of items returned in a single response.

What are @octokit/plugin-paginate-rest's main functionalities?

Paginate through REST API responses

This feature allows users to paginate through the issues of a GitHub repository. The code sample demonstrates how to use the plugin with Octokit to retrieve all issues from a specified repository.

const { Octokit } = require('@octokit/core');
const { paginateRest } = require('@octokit/plugin-paginate-rest');

const MyOctokit = Octokit.plugin(paginateRest);
const octokit = new MyOctokit({ auth: 'personal-access-token' });

async function getAllIssues(owner, repo) {
  const issues = await octokit.paginate('GET /repos/{owner}/{repo}/issues', {
    owner: owner,
    repo: repo
  });
  return issues;
}

Other packages similar to @octokit/plugin-paginate-rest

Keywords

FAQs

Package last updated on 21 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc